<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;

if(!\think\Env::get( 'db_hostname')){
    redirect("/install/index.php")->send();die;
}

Route::any('speech', 'client/client/speech');


Route::get('client', 'client/client/index');
Route::get('app', 'client/client/index');


Route::any('/app/login', 'client/client/login');
Route::get('send_cmd', 'client/client/sendCmd');
Route::get('read', 'client/client/read');



Route::any('/', 'index/default_controller/index');
Route::any('login', 'index/user/login');
Route::any('register', 'index/user/register');


Route::get('httpd', 'socket/httpd/index');


Route::get('xfyun', 'client/xfyun/index');

return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];
